<%@ page language="java"
         contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"
         import="com.shxt.hotel.background.Room"
         import="java.util.Map"
%>
<%
    Room room = new Room();
    
    request.setCharacterEncoding("utf-8");
    Map<String, String[]> paraMap = request.getParameterMap();
    int row = room.addRoom(paraMap);
    String location = "";
    if(row == 0){
        // out.println("failed");
        location = "../background.jsp";
    }else{
        // out.println("success");
        location = "../room_add.jsp";
    }
    room.close();
    
    response.sendRedirect(location);        
%>